var gulp = require('gulp')
var uglify = require('gulp-uglify')
var mincss = require('gulp-minify-css')
var minImage = require('gulp-imagemin')
gulp.task('uglify', function () {
    // 1. 找到文件
    gulp.src('js/**/*')
        // 2. 压缩文件
        .pipe(uglify())
        // 3. 另存压缩后的文件
        .pipe(gulp.dest('E:/gulp/js'))
})

//压缩css
// gulp_minCss(无参)
gulp.task("minCss", function () {
    gulp.src("css/**/*").pipe(mincss()).pipe(gulp.dest("E:/gulp/css"));
});

//压缩图片
// gulp_minImage();
// gulp.task("minImage", function () {
//     gulp.src("details-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/details-images"));
// });
// gulp.task("minImage", function () {
//     gulp.src("FL-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/FL-images"));
// });
// gulp.task("minImage", function () {
//     gulp.src("Footer-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/Footer-images"));
// });
// gulp.task("minImage", function () {
//     gulp.src("FYFive-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/FYFive-images"));
// });
// gulp.task("minImage", function () {
//     gulp.src("FYFour-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/FYFour-images"));
// });

// gulp.task("minImage", function () {
//     gulp.src("FYThree-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/FYThree-images"));
// });

// gulp.task("minImage", function () {
//     gulp.src("FYTwo-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/FYTwo-images"));
// });

// gulp.task("minImage", function () {
//     gulp.src("FYOne-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/FYOne-images"));
// });
// gulp.task("minImage", function () {
//     gulp.src("H-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/H-images"));
// });

// gulp.task("minImage", function () {
//     gulp.src("MB-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/MB-images"));
// });

// gulp.task("minImage", function () {
//     gulp.src("RM-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/RM-images"));
// });
gulp.task("minImage", function () {
    gulp.src("YouLove-images/**/*").pipe(minImage()).pipe(gulp.dest("E:/gulp/YouLove-images"));
});

